#pragma once
#include "MemoryPool.h"
#include "CircleDequeueBase.h"
#include "ClientInformation.h"
#include <map>

using namespace std;

class TQSManager
{
public:
	TQSManager();
	~TQSManager();
	void StartServer();

	/**
	* Get client information include IP,port,trans bytes etc.
	* @return Map for client socket and information
	*/	
	map<SOCKET,Connection> GetClientInformation();

private:
	bool AddCircleQueue(map<int,CircleDequeueBase*> &p_mapCircleQueue);
	bool AddCircleQueueMap(map<int,CircleDequeueBase*> &p_mapCircleQueue,unsigned int p_uiEntireBufferSize,	unsigned int p_uiElementAmount,unsigned int p_uiElementSize,unsigned int p_uiBeginSequence,unsigned int p_uiEndSequence,unsigned char p_uiEntireDataType, unsigned char p_uiIncrementDataType,unsigned char p_ucCircleQueueType);
	bool LoadDll();
	bool IsFileChecked(const int p_iFileIndex);

private:
	MemoryPool* m_pcMemPool;
	ConnectionInformation m_clsClientInfo;
};